using System.Collections.Generic;
using Admin.NET.Application.Entity;

namespace Admin.NET.Application;

public class BuildingOut : Building
{
	public string ParentName
	{
		get
		{
			if (ParentNames.Count > 0)
			{
				string tmp = "";
				for (int i = ParentNames.Count - 1; i >= 0; i--)
				{
					tmp += ParentNames[i];
					if (i > 0)
					{
						tmp += "/";
					}
				}
				return tmp;
			}
			return "-";
		}
	}

	public List<string> ParentNames { get; set; } = new List<string>();


	/// <summary>
	/// 区域父项
	/// </summary>
	public BuildingOut Parent { get; set; } = new BuildingOut();

}
